<script>
import { getPackageParams } from './services/params';

export default {
  async onLaunch() {
    //网关接口请求调试
    //console.log(window.location.href.split('://')[1].split('/')[2]);
    //console.log(window.location.host);
    // console.log(window.location.origin.split('://')[1].split(':')[0]);
    // console.log(window.location.port);
    //let curUrl = 'http://10000.bbbbbk.com:7788/platform';
    let params = {
      u: window.location.origin.split('://')[1].split(':')[0],
      p: window.location.port,
      suffix1: window.location.href.split('://')[1].split('/')[1]
        ? window.location.href.split('://')[1].split('/')[1]
        : '',
      suffix2: window.location.href.split('://')[1].split('/')[2]
        ? window.location.href.split('://')[1].split('/')[2]
        : '',
    };
    //console.log(params);
    const { code, data } = await getPackageParams(params);
    if (code != 200) return;
    if (data) {
      uni.setStorageSync('autoBuy-platformId', data.platformId);
      uni.setStorageSync('autoBuy' + data.platformId, data);
      //process.env.VUE_APP_PLATFORMID = data.captchaAppId;
      //console.log(data);
    }
  },
};
</script>

<style lang="scss">
@import './static/fonts/iconfont.css';
@import 'tailwindcss/utilities';
@import 'uview-ui/index.scss';

*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
}

//2023.08.07
.bg-inputGray {
  background: #f2f2f2;
}
.bg-inputGray-reg {
  background: none;
  border: 1px solid #333333;
}
.bg-inputOrange {
  background: #d62849;
}
.border-common {
  border: 2rpx solid #333;
}
.border-common-gray {
  border: 2rpx solid #ccc;
}
.border-tb-gray {
  border-top: 2rpx solid #ccc;
  border-bottom: 2rpx solid #ccc;
}
.border-b-orange {
  border-bottom: 2rpx solid #ffa829;
}
.border-t-gray {
  border-top: 2rpx solid #ccc;
}
.border-b-gray {
  border-bottom: 2rpx solid #ccc;
}
.border-b-grayLights {
  border-bottom: 2rpx solid #eeeeee;
}
.moreBoxLine {
  border-bottom: 2rpx solid #888;
}
.border-b-grayLight {
  border-bottom: 2rpx solid #ddd;
}
.border-b-gray-dashed {
  border-bottom: 2rpx dashed #ccc;
}
.border-l-gray-dashed {
  border-left: 2rpx dashed #ccc;
}
.login-btn {
  background: #ff3d62;
  box-shadow: 0px 12px 26px 0px #cccccc;
}
.common-box-shadow {
  box-shadow: 0px 12px 26px 0px #cccccc;
}
.bg-box-shadow {
  box-shadow: 0px 12px 26px 0px #e5e5e5;
}
.indexLine {
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -20rpx;
  width: 2rpx;
  height: 40rpx;
  background: #999999;
}
.common-btn {
  width: 100%;
  height: 84rpx;
  line-height: 84rpx;
  box-shadow: 0px 12px 26px 0px #cccccc;
}
.item-3-10 {
  width: 30%;
}
.item-mx-5 {
  margin-left: 5%;
  margin-right: 5%;
}
.activeIndex {
  color: #ff3d62;
  border: 1px solid #ff3d62;
}
.diy-triangle-up {
  width: 0;
  height: 0;
  border: 8rpx solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.6);
}
.moreBox {
  background: rgba(0, 0, 0, 0.6);
}
.button-bg {
  background: rgba(0, 0, 0, 0.4);
}
.common-bar {
  width: 142rpx;
  height: 8rpx;
  background: #e5e5e5;
  border-radius: 4rpx;
}
.customer-bottom-bg {
  background: #f6f6f6;
}
.transitionLinear {
  transition: all 0.3s linear;
}
.default-mr-3 {
  margin-right: 3%;
}
.orderTypeCur {
  color: #fff;
  background: #ff4b83;
  border: 1px solid #fff;
}
.order-btn-border {
  border: 2rpx solid #ff3d62;
}
.order-btn-border-black {
  border: 2rpx solid #333;
}
.bg-orderList {
  background: linear-gradient(180deg, #ff568c, #fe74a0);
}
.businessBox {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0px 14px 81px 0px rgba(214, 197, 203, 0.3);
  width: 100%;
  height: auto;
}
</style>
